home *** CD-ROM | disk | FTP | other *** search
/ Amoszine 6 / Amoszine 6 (Disk 2 of 2).adf / extra_source.lha / OTHER_SOURCE / REF_NUMBER.Amos / REF_NUMBER.amosSourceCode
Encoding:
AMOS Source Code  |  1992-02-26  |  357 b   |  12 lines

  1. Procedure REF_NUMBER[R$]
  2.  'UPDATED V1_f_37 
  3.  '* Converts the 3-digit R$ into it's value 
  4.  '* Can handle > 16 million  w/o looping around 
  5.  '
  6.  'Modified by Andy Church: return a number instead of a string, and fix 
  7.  '  "R2=...*256" (now "...*255"). 
  8.  '
  9.  R1=(Asc(Left$(R$,1))-1)*65535
  10.  R2=(Asc(Mid$(R$,2,1))-1)*255
  11.  R3=(Asc(Mid$(R$,3,1))-1)
  12. End Proc[R1+R2+R3]